package com.gulimall.product.feign.fallback;

import com.common.exception.BizCodeEnum;
import com.common.utils.R;
import com.gulimall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Author Rookie-6688
 * @Description
 * @Create 2021-05-18 22:18
 */
@Component
@Slf4j
public class SeckillFeignServiceFallBack implements SeckillFeignService {

    @Override
    public R getSkuSeckillInfo(Long skuId) {
        log.info("feign服务熔断-----------------");
        return R.error(BizCodeEnum.TO_MANY_REQUEST.getCode(),BizCodeEnum.TO_MANY_REQUEST.getMsg());
    }
}
